<template>
  <div class="my_view">
    <!-- 邮箱提示块 -->
    <div class="email"><span class="iconfont icon-youjian"></span></div>
    <!-- 登陆显示块 -->
    <div class="user_box">
      <div class="top">
        <div class="left">
          <div class="img">
            <img src="" alt="" />
          </div>
          <div class="right">
            <router-link tag="h3" :to="{ name: 'login' }">立即登陆</router-link>
            <p>登陆即可全场免费读 <span style="color: red">5天</span></p>
          </div>
        </div>
      </div>
      <div class="bottom">
        <div class="left">
          <p>余额</p>
          <i>充值送红包</i>
          <div class="deposit">充值</div>
        </div>
        <div class="right">
          <p>签到</p>
          <i>做任务领红包</i>
          <div class="sign">签到</div>
        </div>
      </div>
    </div>
    <!-- 功能块 -->
    <div class="func_block">
      <div class="func">
        <span class="iconfont icon-bijijilu"></span>
        <div class="right">
          笔记<span class="iconfont icon-youjiantou"></span>
        </div>
      </div>
      <div class="func">
        <span class="iconfont icon-yunshangchuan_o"></span>
        <div class="right">
          已购和上传<span class="iconfont icon-youjiantou"></span>
        </div>
      </div>
      <div class="func">
        <span class="iconfont icon-kefu"></span>
        <div class="right">
          在线客服<span class="iconfont icon-youjiantou"></span>
        </div>
      </div>
      <div class="func">
        <span class="iconfont icon-moonyueliang"></span>
        <div class="right">
          夜间模式<van-switch
            v-model="checked"
            @click="checked = !checked"
            size="20px"
          />
        </div>
      </div>
      <div class="func">
        <span class="iconfont icon-huiyuan"></span>
        <div class="right">
          积分商城<span class="iconfont icon-youjiantou"></span>
        </div>
      </div>
      <div class="func">
        <span class="iconfont icon-shezhi"></span>
        <div class="right">
          设置<span class="iconfont icon-youjiantou"></span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      checked: false,
    };
  },
};
</script>

<style lang="less" scoped>
.my_view {
  width: 100vw;
  height: 100vh;
  //邮箱提示块
  .email {
    height: 30px;
    padding: 0 16px;
    align-items: center;
    display: flex;
    justify-content: flex-end;
  }
  //登陆显示块
  .user_box {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    // 上部分
    .top {
      display: flex;
      align-items: center;
      .left {
        display: flex;
        align-items: center;
        .img {
          width: 62px;
          height: 68px;
          background: #ccc;
          border-radius: 50%;

          img {
            width: inherit;
            height: inherit;
            border-radius: 50%;
          }
        }
      }
      .right {
        flex: 1;
        margin-left: 16px;
        h3 {
          color: #1d1d1d;
          font-size: 20px;
          font-weight: 600;
        }
        p {
          margin-top: 5px;
          color: #777777;
          font-size: 12px;
          span {
            color: #f89d9d;
          }
        }
      }
    }

    //下部分
    .bottom {
      display: flex;
      width: 100%;
      height: 104px;
      .left,
      .right {
        flex: 1;
        text-align: center;
        p {
          margin-top: 25px;
          font-size: 16px;
          color: #121212;
          font-weight: 600;
        }
        i {
          font-style: normal;
          display: block;
          margin-top: 10px;
          color: #959595;
          font-size: 12px;
        }
        div {
          margin: 15px auto 0 auto;
          color: #fff;
          width: 55px;
          height: 20px;
          line-height: 20px;
          text-align: center;
          background-color: #f24949;
          border-radius: 15px;
          font-size: 12px;
          &.sign {
            background-color: #fff;
            color: #f24949;
            border: 1px solid #f24949;
          }
        }
      }
      &::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translateY(20px);
        width: 1px;
        height: 50px;
        background-color: #f5f5f5;
      }
    }
  }
  //功能操作块
  .func_block {
    padding: 4px 16px;
    .func {
      height: 50px;
      display: flex;
      align-items: center;
      span {
        font-size: 18px;
        color: #adadad;
      }
      .right {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #adadad;
        font-size: 12px;
        margin-left: 14px;
        span {
          font-size: 12px;
        }
      }
    }
  }
}
</style>